package grafico;

import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class PanelFondo extends JPanel {

	/**
	 * Create the panel.
	 */
	public PanelFondo() {

	}
	public void paintComponent (Graphics g){
		Dimension tamanio = getSize();
		ImageIcon imagenFondo = new ImageIcon(getClass().getResource("/imagenes/fondo.jpg"));
		g.drawImage(imagenFondo.getImage(),0,0,tamanio.width, tamanio.height, null);
		setOpaque(false);
		super.paintComponent(g);
		}
	
	/* 
	 (PantallaPrincipal frame) {
		ImageIcon img=new ImageIcon(this.getClass().getResource("/imagenes/icono.jpg"));
		
		setBackground(new Color(105, 105, 105));
		setForeground(new Color(128, 128, 0));
		
		
		JLabel icono = new JLabel(img);
		
		JLabel lblHotelLaribera = new JLabel("Hotel LaRibera");
		lblHotelLaribera.setForeground(Color.WHITE);
		lblHotelLaribera.setBackground(Color.WHITE);
		lblHotelLaribera.setFont(new Font("Tahoma", Font.BOLD, 30));
		
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
				groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
						.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
							.addGroup(groupLayout.createSequentialGroup()
								.addGap(75)
								.addComponent(lblHotelLaribera)
								.addGap(378)
								.addComponent(icono))))
		);
		groupLayout.setVerticalGroup(
				groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
						.addGap(7)
						.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
							.addGroup(groupLayout.createSequentialGroup()
								.addGap(52)
								.addComponent(lblHotelLaribera))
							.addComponent(icono, GroupLayout.PREFERRED_SIZE, 141, GroupLayout.PREFERRED_SIZE))
			)
		);
		setLayout(groupLayout);

	}
	 */

}
